def flatten(_nested):
    for sublist in _nested:
        for element in sublist:
            yield element


nested = [[1, 2], [3, 4], [5]]
for num in flatten(nested):
    print(num)
